﻿using System.Collections.Generic;
using System.Web;
using Framework.Library.Core.Config;
using Framework.Library.Base.Helper;

namespace Framework.Library.Base.Extensions
{
    public static class ApplicationHelper
    {
        private static readonly ConfigHelper cfg = new ConfigHelper();
        private static string MEMBER_LOGIN = cfg.PrefixMember.VALUE + "MEMBER_LOGIN";

        public static Dictionary<int, string> GetUser(this HttpApplicationState state)
        {
            if (state != null && state[MEMBER_LOGIN] != null)
            {
                return ((Dictionary<int, string>)state[MEMBER_LOGIN]);
            }
            return null;
        }
    }
}